/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.search;

import br.com.foxline.model.Users;
import br.com.foxline.service.UserService;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author ely
 */
@ManagedBean
@ViewScoped
public class ManagerSearchUser1 {

    @EJB
    UserService userService;
   
    private Users user;
    private List<Users> users;

    public ManagerSearchUser1() {
    }

    @PostConstruct
    public void init() {
        user = new Users();
        users = new ArrayList<Users>();
    }

    public void searchUser() {
        users = userService.findUsers(user);
    }

    public UserService getUserService() {
        return userService;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public Users getUser() {
        return user;
    }

    public void setUser(Users user) {
        this.user = user;
    }

    public List<Users> getUsers() {
        return users;
    }

    public void setUsers(List<Users> users) {
        this.users = users;
    }
    
    
    
}
